class ClientServlet < HTTPServlet::AbstractServlet
  def do_GET(req, resp)   
    if req.query['name']
      resp.body = 
        "#{@options[0]} #{req.query['name']}. #{@options[1]}"
      raise HTTPStatus::OK
    else
      raise HTTPStatus::PreconditionFailed.new(
        "missing attribute: 'name'")
    end
  end
  alias do_POST, do_GET    # let's accept POST request too.
end
